<?php
require '../../../zb_system/function/c_system_base.php';
require '../../../zb_system/function/c_system_admin.php';
$zbp->Load();
$action='root';
if (!$zbp->CheckRights($action)) {$zbp->ShowError(6);die();}
if (!$zbp->CheckPlugin('plain')) {$zbp->ShowError(48);die();}
$blogtitle='主题配置';
if ($_GET['act']){
	$act = GetVars("act", "GET","config");
}
require $blogpath . 'zb_system/admin/admin_header.php';
require $blogpath . 'zb_system/admin/admin_top.php';
//基本设置
if(isset($_POST['submit'])){
	if (function_exists('CheckIsRefererValid')) CheckIsRefererValid();
	/*SEO*/
	$zbp->Config('plain')->seo = $_POST['seo'];
	$zbp->Config('plain')->title = $_POST['title'];
	$zbp->Config('plain')->keywords = $_POST['keywords'];
	$zbp->Config('plain')->description = $_POST['description'];
	$zbp->Config('plain')->separator = $_POST['separator'];
	$zbp->Config('plain')->tongji = $_POST['tongji'];
	$zbp->Config('plain')->topad = $_POST['topad'];
	$zbp->Config('plain')->btmad = $_POST['btmad'];
	$zbp->Config('plain')->postad = $_POST['postad'];
	$zbp->SaveConfig('plain');
	$zbp->ShowHint('good');	
}
?>
<div id="divMain">
	<div class="divHeader"><?php echo $blogtitle;?></div>
	<div class="SubMenu">
	<?php plain_SubMenu($act);?>
     <a href="http://www.boke8.net/zblog-php-plain.html" target="_blank"><span class="m-right">技术支持</span></a>
    </div>
<div id="divMain2">
<?php if ($act == 'config') { ?>
<table id="form1" name="form1" width="100%" cellspacing="0" cellpadding="0" class="tableBorder">
<tr>
    <th width="30%">选项名称</th>
    <th width="20%">当前LOGO</th>
	<th width="50%">上传png格式的logo</th>
	<th width="25%">操作</th>
  </tr>
  <form enctype="multipart/form-data" method="post" action="save.php?type=logo">
	<tr>
    <td>
    LOGO图片
</td>
	<td>
	
	<a href="style/images/logo.png" target="_blank"><img src="style/images/logo.png" height="40px"></a>

	</td>
	<td>
		<input name="logo.png" type="file"/>
	</td>
	<td>
		<?php if (function_exists('CheckIsRefererValid')) {echo '<input type="hidden" name="csrfToken" value="' . $zbp->GetCSRFToken() . '">';}?>
		<input name="Submit" type="Submit" class="button" value="保存"/>
	</td>
	</tr>
	</form>  
</table>
<table name="form1" width="100%" style="padding:0;margin:0;" cellspacing="0" cellpadding="0" class="tableBorder">
	<br/>
	<tr>
    <td>	
		<p>1、plain主题是由 <a href="http://www.boke8.net" target="_blank">博客吧</a> 开发制作并免费分享的 zblog php 主题，使用该主题请保留博客吧的版权链接</p>
		<p>2、免费主题不提供在线技术支持，有问题请到 <a href="http://www.boke8.net/zblog-php-plain.html" target="_blank">plain主题发布页面</a> 留言，尽量解答</p>
		<p>3、博客吧提供zblog php仿站、psd转zblog主题、程序主题插件安装调试服务，有需要可联系！</p>
	</td>
	
	</tr>	
</table>
<?php } if($act == 'other'){?>
<form id="form2" name="form2" method="post">	
    <table width="100%" cellspacing="0" cellpadding="0" class="tableBorder">
		<tr>
			<th width="15%">选项名称</th>
			<th width="50%">选项内容</th>
			<th width="25%">选项说明</th>

		</tr>
		<tr>
			<td>
				<label for="seo">主题SEO设置</label>
			</td>
			<td>
				<input type="text" id="seo" name="seo" class="checkbox" value="<?php echo $zbp->Config('plain')->seo;?>"/>
			</td>
			<td>
				选择是否使用主题自带SEO设置，默认开启，切换为ON关闭
			</td>
		</tr>
		<tr>
			<td>
				<label for="title">
					站点title标题
				</label>
			</td>
			<td>
				<input type="text" name="title" id="title"style="width:98%;" value="<?php echo $zbp->Config('plain')->title;?>"/>
			</td>
			<td>
			自定义网站首页title标题
		</td>
		</tr>
		<tr>
			<td>
				<label for="keywords">
				关键词
			</label>
		</td>
			<td>
				<input type="text" name="keywords" id="title"style="width:98%;" value="<?php echo $zbp->Config('plain')->keywords;?>"/>
			</td>
			<td>
			自定义网站关键词，多个关键词用英文逗号隔开
		</td>
		</tr>
		<tr>
			 <td>
			 	<label for="description">
			 	网站描述
			 </label>
			</td>
			<td>
				<textarea name="description" type="text" id="description" style="width:98%;"><?php echo $zbp->Config('plain')->description;?></textarea>
			</td>
			<td>
			自定义网站描述
		</td>
		</tr>
		<tr>
			<td>
				<label for="separator">
				标题分隔符
			</label>
		</td>
			<td>
				<input type="text" name="separator" id="title"style="width:98%;" value="<?php echo $zbp->Config('plain')->separator;?>"/>
			</td>
			<td>
			网站title标题分隔符
		</td>
		</tr>
		<tr>
			<td><label for="tongji">
			统计代码
		</label></td>
			<td>
				<textarea name="tongji" type="text" id="tongji" style="width:98%;"><?php echo $zbp->Config('plain')->tongji;?></textarea>
			</td>
			<td>
			添加统计代码
		</td>
		</tr>
		<tr>
			 <td><label for="topad">
			 顶部广告
			</label></td>
			<td>
				<textarea name="topad" type="text" id="topad" style="width:98%; height:140px;"><?php echo $zbp->Config('plain')->topad;?></textarea>
			</td>
			<td>
			全网站顶部广告
		</td>
		</tr>
		<tr>
			 <td>
			 	<label for="btmad">
			 	底部广告
			 	</label>
			</td>
			<td>
				<textarea name="btmad" type="text" id="btmad" style="width:98%; height:140px;"><?php echo $zbp->Config('plain')->btmad;?></textarea>
			</td>
			<td>
			全网站底部广告
		</td>
		</tr>
		<tr>
			 <td>
			 	<label for="postad">
			 	文章广告
			 </label></td>
			<td>
				<textarea name="postad" type="text" id="postad" style="width:98%; height:140px;"><?php echo $zbp->Config('plain')->postad;?></textarea>
			</td>
			<td>
			文章内容上方广告
		</td>
		</tr>
	</table>
	<?php if (function_exists('CheckIsRefererValid')) {echo '<input type="hidden" name="csrfToken" value="' . $zbp->GetCSRFToken() . '">';}?>
	<p>
	<input name="submit" type="Submit" class="button" style="width:15%;" value="保存"/></p>
</form>
	
<?php
    }	
?>
</div>
</div>
<script type="text/javascript">
ActiveTopMenu("topmenu_plain");
</script> 
<?php
require $blogpath . 'zb_system/admin/admin_footer.php';
RunTime();
?>